#ifndef ASM_H
#define ASM_H

#include <Types.h>

inline int
memcpy(void *src, void *dst, uint32 sz){
	asm("movl %0, %%esi"::"r" ((uint32)src):"%eax");
	asm("movl %0, %%edi"::"r" ((uint32)dst):"%eax");
	asm("movl %0, %%ecx"::"r" (sz):"%eax");
	asm("rep movsb;");
}

#define testbit(var, bit)	\
	((((var) & (1 << (bit))) > 0) ? 1 : 0)
	
#define setbit(var, bit)	\
	((var) | (1 << (bit)))
	
#define clrbit(var, bit)	\
	((var) & (~(1 << (bit))))
	
#define KSTOP	for(;;)

#endif /* ASM_H */ 

